package com.gonsin.gview.common.controller;

import cn.hutool.core.util.ClassUtil;
import com.gonsin.base.ResponseResult;
import com.gonsin.gview.annotations.GView;
import com.gonsin.gview.common.config.GViewResourceProperties;
import com.gonsin.gview.logic.config.GViewFileProperties;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "GView内置资源接口")
public class GViewResourceController {

    @Autowired(required = false)
    private GViewResourceProperties resourceProperties;


    @ApiOperation("资源 - 查询设置")
    @GetMapping("/api/webSiteSet/getWebSiteSet")
    public ResponseResult<GViewResourceProperties> getResourceProperties(){
        GViewResourceProperties pp = resourceProperties.clone();
        pp.setSslKeyFilePath(null);
        pp.setSslPemFilePath(null);
        return ResponseResult.result(pp);
    }


}
